package com.sailfish.springbootdemo.service.db1;

import com.sailfish.springbootdemo.dao.db1.BisBigDao;
import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.pojo.db1.BisBig;
import com.sailfish.springbootdemo.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BisBigServiceImpl implements BisBigService {

    @Autowired
    private BisBigDao bisBigDao;

    @Override
    public Result getAllBisBig() {

        try {
            List<BisBig> allBisBig = bisBigDao.getAllBisBig();
            return ResultUtil.success(allBisBig);
        } catch (Exception e) {
            e.printStackTrace();
            return ResultUtil.error(500, e.getMessage(), e.getMessage(), null);
        }
    }
}
